package com.communal.model.tarif;

import java.io.Serializable;

import javax.persistence.AssociationOverride;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;

/**
 * 
 * @author Created by andrey.kuznetsov <br>
 * @author Last modified by $Author$ <br>
 * @author Last modified on $Date$ at revision $Revision$ <br>
 */
@Entity
@Table(name = "tarif_water_hot")
@AttributeOverrides({
	@AttributeOverride(name="enabled", column=@Column(name="enabled")),
	@AttributeOverride(name="id", column=@Column(name="id")),
	@AttributeOverride(name="tarifName", column=@Column(name="tarif_name"))
})	
@AssociationOverride( name="model", joinColumns = @JoinColumn(name="model_id"))
public class TarifWaterHot extends Tarif implements Serializable{

	private static final long serialVersionUID = 2993922721658683436L;
	
	@Column(name = "type", unique = false, nullable = false, insertable = true, updatable = true)
	private Short type;
	
	@Column(name = "summa", unique = false, nullable = false, insertable = true, updatable = true)
	private Double summa;

	/**
	 * Returns tarif type (0- tarif for counter, 1- fixed) <br>
	 * @return {@link Short};
	 */
	public Short getType() {
		return type;
	}

	/**
	 * Sets tarif type (0- tarif for counter, 1- fixed) <br>
	 * @param p_type - {@link Short};
	 */
	public void setType(Short p_type) {
		type = p_type;
	}

	/**
	 * Returns summa  for payment <br>
	 * @return {@link Double};
	 */
	public Double getSumma() {
		return summa;
	}

	/**
	 * Sets summa for payment
	 * @param p_summa - {@link Double};
	 */
	public void setSumma(Double p_summa) {
		summa = p_summa;
	}
}
